/**
 * 
 */
package net.yters.model.agents.actuators;

import net.yters.util.Box;
import net.yters.util.Util;

public class TurnActuator extends ActuatorAgent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 992989315799759439L;
	Box f_angle = new Box(new Double(0));  // TODO HACK
	
	public TurnActuator(Double angle) {
		super();
		
		f_angle.f_value = angle;
		addBoxedParameter("angle", f_angle);
	}
	
    @Override
	public void execute() {
        net.yters.util.Util.emboxArray(f_ownerAgent.f_direction, 
        		Util.rotate(net.yters.util.Util.disemBoxArray(f_ownerAgent.f_direction), 
        				(Double) f_angle.f_value));  // TODO HACK
    }
}